import request from '@/utils/request'

// 查询采购单列表
export function listErpProcure(query) {
  return request({
    url: '/erp/ErpProcure/list',
    method: 'get',
    params: query
  })
}

// 查询采购单详细
export function getErpProcure(procureId) {
  return request({
    url: '/erp/ErpProcure/' + procureId,
    method: 'get'
  })
}

// 新增采购单
export function addErpProcure(data) {
  return request({
    url: '/erp/ErpProcure',
    method: 'post',
    data: data
  })
}

// 修改采购单
export function updateErpProcure(data) {
  return request({
    url: '/erp/ErpProcure',
    method: 'put',
    data: data
  })
}

// 删除采购单
export function delErpProcure(procureId) {
  return request({
    url: '/erp/ErpProcure/' + procureId,
    method: 'delete'
  })
}



// 审核采购单
export function auditErpProcure(data) {
  return request({
    url: '/erp/ErpProcure/audit',
    method: 'put',
    data: data
  })
}

// 更改物流状态
export function updateErpProcureUpdateLogistics(data) {
  return request({
    url: '/erp/ErpProcure/logistics',
    method: 'put',
    data: data
  })
}